package com.gxm.base.grammar_运算语法.面试题;

import org.junit.Test;

public class 后加加 {

    @Test
    public void test00(){
        int i = 1;
        //i++ (tmp = i ;i=tmp + 1)
        i++;
        System.out.println("i="+i);
    }

    @Test
    public void test01(){
        int i = 1;
        //tmp = i ; i=tmp+1;i=tmp;  用的临时变量去 给左边赋值的
        i = i++;
        System.out.println("i="+i);
    }

    @Test
    public void test02(){
        int i = 1;
        //为什么 j=1?
        int j = i++;
        System.out.println("i="+i+",j="+j);
    }
}
